<script setup lang="ts">
import { ref } from 'vue';
// 3。给子组件定义变量和方法
const car = ref('我是儿子的车')
const logCar = () => {
  console.log(car.value);
}
// 暴露方法和变量
defineExpose({ car, logCar })
</script>

<template>
  <div class="app-page">{{ car }}</div>
</template>

<style lang="css" scoped></style>
